<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script>
    // 定义一个字符串
    // 特点：字符串是不可变的
    // var a = "abc";
    // a = "cde";

    // 大量拼接字符串时，会有效率问题
    var sum = "";
    for (var i = 1 ; i <= 1000000 ; i++) {
      sum += i;
    }
    console.log(sum);
  </script>
</head>
<body>
  
</body>
</html>